﻿<!--#include file="utf-8.asp"-->
<!--#include file="conn.asp"-->
<%
'######################################
' 安科外贸网站管理系统中英文双语版
' anke Enterprise Web Site Management System
' 官方网站：http://www.shejifang.org
' 联系QQ：357052954
' 淘宝店： http://shejifang.taobao.com
'######################################
%>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from news"
rs.open sql,conn,1,3
title=request.form("title")
etitle=request.form("etitle")
body=request.form("body")
ebody=request.form("ebody")
ssfl=request.form("ssfl")
zz=request.form("zz")
ly=request.form("ly")
description2=request.form("description2")
edescription2=request.form("edescription2")
keyword=request.form("keyword")
ekeyword=request.form("ekeyword")

if title=""  then 
response.Write("<script language=javascript>alert('中文标题不能为空!');history.go(-1)</script>") 
response.end 
end if
if etitle=""  then 
response.Write("<script language=javascript>alert('英文标题不能为空!');history.go(-1)</script>") 
response.end 
end if
if body="" then 
response.Write("<script language=javascript>alert('中文内容不能为空!');history.go(-1)</script>") 
response.end 
end if
if ebody="" then 
response.Write("<script language=javascript>alert('中文内容不能为空!');history.go(-1)</script>") 
response.end 
end if

rs.addnew
rs("title")=title
rs("etitle")=etitle
rs("body")=body
rs("ebody")=ebody
rs("ssfl")=ssfl
rs("zz")=zz
rs("ly")=ly
rs("description2")=description2
rs("edescription2")=edescription2
rs("keyword")=keyword
rs("ekeyword")=ekeyword

rs.update
rs.close
set rs=nothing
conn.close
set rs=nothing
%>

<%
Response.Write "<script>alert('新闻增加成功！点击继续添加！');window.location.href='add_news.asp';</script>" 
%>

